<template>
  <div class="content-box padding-10 cursor-pointer bg-f8">
    <div class="flex justify-between">
      <div class="flex left-box align-center">
        <div class="tag-blue-box padding-left-right-5 padding-top-bottom-3 font-size-12 t-center">{{ model.workTypeName }}</div>
        <div class="padding-left-right-20 color-666666">{{ model.workStatus == 3 ? "已解决" : "未解决" }}</div>
      </div>
      <div class="flex right-box">
        <div>上报人:{{model.createUserName}}</div>
        <div class="padding-left-40">上报时间：{{ model.createTime | formatDateTime }}</div>
        <div class="padding-left-40">开始时间：{{ model.startTime | formatDateTime }}</div>
        <div class="padding-left-40">结束时间：{{ model.endTime | formatDateTime }}</div>
      </div>
    </div>
    <div class="font-size-16 margin-top-10 three-line-ellipsis">{{ model.description }}</div>
    <div class="full-box">
      <div class="img-box" v-for="item in model.imageAttachmentList || []" :key="item.primaryKey">
        <el-image class="img" :preview-src-list="model.imgList" :src="item.fileUrl" fit="cover"></el-image>
      </div>
    </div>
    <div class="full-box margin-top-10">
      <el-link v-for="item in model.fileAttachmentList || []" :key="item.primaryKey" type="primary" class="margin-right-20" @click="downLoadUrl(item.fileUrl)">
        <i class="icon el-icon-paperclip"></i>
        <span>{{ item.fileTitle }}</span>
      </el-link>
    </div>
  </div>
</template>
<script>
  import { uploadLoad } from '@/common/js/utils';
  export default {
    props: {
      isLeader: {
        type: Boolean,
        default: false,
      },
      model: {
        type: Object,
        default: () => {
          return {};
        },
      },
    },

    data() {
      return {
      };
    },

    mounted() {},

    methods: {
      downLoadUrl(url) {
        uploadLoad(url);
      },
    },
  };
</script>
<style lang="scss" scoped>
  .tag-orange-box {
    background: rgba(247, 145, 0, 0.1);
    border-radius: 3px;
    color: #f79100;
  }
  .tag-blue-box {
    background: rgba(51, 132, 254, 0.1);
    border-radius: 3px;
    color: #3384fe;
  }
  .content-box {
    overflow: hidden;
  }
  .bg-f8{
    background: #F8F8F8;
  }
  .img-box {
    width: 80px;
    height: 80px;
    margin-top: 15px;
    margin-right: 15px;
    float: left;
    .img {
      width: 80px;
      height: 80px;
    }
  }
</style>
